Implement trivially on Windows. Not sure if something more complex is
authorTor Lillqvist <tml@novell.com>
Wed, 1 Oct 2008 11:02:22 +0000 (11:02 +0000)
committerTor Lillqvist <tml@src.gnome.org>
Wed, 1 Oct 2008 11:02:22 +0000 (11:02 +0000)
2008-10-01  Tor Lillqvist  <tml@novell.com>

* gdk/win32/gdkkeys-win32.c (gdk_keymap_get_caps_lock_state):
Implement trivially on Windows. Not sure if something more complex
is actually needed, more specifically whether the function needs
to differentiate between "Caps Lock" and "Shift Lock" semantics?

svn path=/trunk/; revision=21558

ChangeLog
gdk/win32/gdkkeys-win32.c

index 95488cb93037526b1529905f76955fe1d2fc7e75..03be98bcb91556f42c4559211859ec3f0d6f353c 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2008-10-01  Tor Lillqvist  <tml@novell.com>
+
+       * gdk/win32/gdkkeys-win32.c (gdk_keymap_get_caps_lock_state):
+       Implement trivially on Windows. Not sure if something more complex
+       is actually needed, more specifically whether the function needs
+       to differentiate between "Caps Lock" and "Shift Lock" semantics?
+
 2008-10-01  Simos Xenitellis  <simos@gnome.org>
 
        Bug 554506 – combining diacritics broken, became deadkeys
index e86ea970614f8bcd9f4195ec777360de68682ed9..30cb7316d3654d55c553d1bcbbc328d31f00ca3c 100644 (file)
@@ -530,6 +530,12 @@ gdk_keymap_have_bidi_layouts (GdkKeymap *keymap)
   return FALSE;
 }
 
+gboolean
+gdk_keymap_get_caps_lock_state (GdkKeymap *keymap)
+{
+  return ((GetKeyState (VK_CAPITAL) & 1) != 0);
+}
+
 gboolean
 gdk_keymap_get_entries_for_keyval (GdkKeymap     *keymap,
                                    guint          keyval,